<template>
  <a-button :loading="loading" :size="size" :type="type" @click="onBtnClick" :disabled="disabled">
    <i class="fa" :class="`fa-${icon}`" v-if="!loading"/>
    <span :class="loading?'':'ml5'"><slot></slot></span>
  </a-button>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: 'primary'
    },
    size: {
      type: String,
      default: 'default'
    },
    icon: {
      type: String,
      default: 'plus'
    },
    disabled: {
      type: Boolean,
      default: false
    },
    loading: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
    }
  },
  mounted () {
  },
  methods: {
    onBtnClick () {
      this.$emit('click')
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
